/**
 * 查看推荐用户页面js
 * 版权所有：上海戈品投资管理有限公司
 *   author king
     功能说明：查看推荐用户
     创建日期：2015-10-15
     修改记录：
     备注说明：
 */

$(document).ready(function() {
	agentList();
});


/**
 * 查询代理人列表
 * @returns
 */
var agentList = function(){
	var agentId = $('#agentId').val();
	var datas =  {"p":"seachAgentDevelopUsers","m":"query","agentId":agentId,"searchType":1};
	var columnDefine = {"id":"用户ID","name":"用户昵称","registTime":"关注时间","agentId":"代理人编号","agentName":"代理人名称"};
	
	var formatters={
	            "registTime": function (column, rowData)
	            {
    				var newTime= new Date(rowData.registTime);
    				var rowText=newTime.getFullYear()+'-'+getTheSureTime((newTime.getMonth()+1))+'-'
    				+getTheSureTime(newTime.getDate())+' '+getTheSureTime(newTime.getHours())+':'
    				+getTheSureTime(newTime.getMinutes())+':'+getTheSureTime(newTime.getSeconds());
    				return rowText;
	            }
	 };
	 var buttons =''; //操作按钮
		buttons+='<p>';
		buttons+='</p>';
	   hui.pager('service',datas ,"dataList", columnDefine , formatters , buttons ); //分页查询
	
};

